<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>
<style type="text/css">
    .errstyle {border:1px solid red;}
    .bor {border:1px solid #C0C0C0;}
    form span{
        color: red;
        position: relative;
        top: 3px;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <form action="${ctx }/admin/employee/save1?id=${n.id}" id="detail-form" class="form-horizontal" method="post">

        <div class="form-group">
            <!-- 用户ID -->
            <input type="hidden" id="user-id" name="user.id" value="${n.user.id }" class="form-control">
            <%--<label class="col-sm-2 control-label">用户ID</label>
            <div class="col-sm-4">
                <input type="hidden" id="user-id" name="user.id" value="${n.user.id }" class="form-control">
                <input type="text"  placeholder="请选择用户ID" class="form-control"  id="user-name" name="user.username" value="${n.user.id}"
                       onclick="bring({
                               url:'${ctx}/admin/user/search',
                               name: 'username',
                               idInput: 'user-id',
                               nameInput: 'user-name'
                               })" />--%>
            <label class="col-sm-2 control-label">工作部门</label>
            <div class="col-sm-4">
                <input type="hidden" id="department-id" name="department.id" value="${n.department.id }" class="form-control">
                <input type="text"  placeholder="请选择部门" class="form-control"  id="department-name" name="department.name" value="${n.department.id}"
                       onclick="bring({
                               url:'${ctx}/admin/department/search',
                               name: 'name',
                               idInput: 'department-id',
                               nameInput: 'department-name'
                               })" />
            </div>

            <!-- 岗位 -->
            <label class="col-sm-2 control-label">岗位</label>
            <div class="col-sm-4">
                <!--<input type="text" class="form-control" name="position" value="${n.position }">-->
                <select  id=select1 name="position">
                    <option value ="JAVA" ></option>
                    <option value ="JAVA" >JAVA</option>
                    <option value ="前端" >前端</option>
                    <option value="安卓"  >安卓</option>
                    <option value="产品"  >产品</option>
                </select>
            </div>
        </div>
        <div class="form-group">

            <!-- 姓名 -->
            <label class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-4">
                <input id="input1" type="text" class="form-control" name="name" value="${n.name }">
            </div>

            <!-- 出生日期 -->
            <label class="col-sm-2 control-label">出生日期</label>
            <div class="col-sm-4">
                <input id="input2" type="text" class="form-control" name="birth" value="<fmt:formatDate value='${n.birth }' pattern='yyyy-MM-dd'/>" onclick="laydate({format: 'YYYY-MM-DD'})">
            </div>
        </div>
        <div class="form-group">

            <!-- 性别 -->
            <label class="col-sm-2 control-label">性别</label>
            <div class="col-sm-4">
                <select  id="select6" name="sex">
                    <option value ="0" ></option>
                    <option value ="1" >男</option>
                    <option value ="2" >女</option>
                </select>
            </div>

            <!-- 身高 -->
            <label class="col-sm-2 control-label">身高</label>
            <div class="col-sm-3">
                <input id="input4" type="text" class="form-control" name="height" value="${n.height }">
            </div>
            <div class="col-sm-1">
                cm
            </div>
        </div>
        <div class="form-group">

            <!-- 体重 -->
            <label class="col-sm-2 control-label">体重</label>
            <div class="col-sm-3">
                <input id="input5" type="text" class="form-control" name="weight" value="${n.weight }">
            </div>
            <div class="col-sm-1">
                kg
            </div>

            <!-- 籍贯 -->
            <label class="col-sm-2 control-label">籍贯</label>
            <div class="col-sm-4">
                <input id="input6" type="text" class="form-control" name="place" value="${n.place }">
            </div>
        </div>
        <div class="form-group">

            <!-- 民族 -->
            <label class="col-sm-2 control-label">民族</label>
            <div class="col-sm-4">
                <input id="input7" type="text" class="form-control" name="nation" value="${n.nation }">
            </div>

            <!-- 联系电话 -->
            <label class="col-sm-2 control-label">联系电话</label>
            <div class="col-sm-4">
                <input id="input8" type="text" class="form-control" name="phone" value="${n.phone }">
            </div>
        </div>
        <div class="form-group">

            <!-- 身份证号 -->
            <label class="col-sm-2 control-label">身份证号</label>
            <div class="col-sm-4">
                <input id="input9" type="text" class="form-control" name="IDCard" value="${n.IDCard }">
            </div>

            <!-- 毕业学校 -->
            <label class="col-sm-2 control-label">毕业学校</label>
            <div class="col-sm-4">
                <input id="input10" type="text" class="form-control" name="school" value="${n.school }">
            </div>
        </div>
        <div class="form-group">

            <!-- 专业 -->
            <label class="col-sm-2 control-label">专业</label>
            <div class="col-sm-4">
                <input id="input11" type="text" class="form-control" name="major" value="${n.major }">
            </div>

            <!-- 学历 -->
            <label class="col-sm-2 control-label">学历</label>
            <div class="col-sm-4">

                <select  id="select2" name="education">
                    <option value ="0" ></option>
                    <option value ="1" >高中</option>
                    <option value ="2" >本科</option>
                    <option value="3"  >硕士</option>
                    <option value="4"  >博士</option>
                </select>
            </div>
        </div>
        <div class="form-group">

            <!-- 户口所在地 -->
            <label class="col-sm-2 control-label">户口所在地</label>
            <div class="col-sm-4">
                <input id="input12" type="text" class="form-control" name="location" value="${n.location }">
            </div>

            <!-- 居住地址 -->
            <label class="col-sm-2 control-label">居住地址</label>
            <div class="col-sm-4">
                <input id="input13" type="text" class="form-control" name="address" value="${n.address }">
            </div>
        </div>
        <div class="form-group">

            <!-- 微信号 -->
            <label class="col-sm-2 control-label">微信号</label>
            <div class="col-sm-4">
                <input id="input14" type="text" class="form-control" name="wechat" value="${n.wechat }">
            </div>

            <!-- 邮箱 -->
            <label class="col-sm-2 control-label">邮箱</label>
            <div class="col-sm-4">
                <input id="input15" type="text" class="form-control" name="email" value="${n.email }">
            </div>
        </div>
        <div class="form-group">

            <!-- 婚姻状况 -->
            <label class="col-sm-2 control-label">婚姻状况</label>
            <div class="col-sm-4">
                <!--  <input type="text" class="form-control" name="marry" value="${n.marry }">
                <input type="radio" name="marry" value="1">未婚</input>
                 <input type="radio" name="marry" value="2">已婚</input>
                 <input type="radio" name="marry" value="0">离异</input>-->
                <select id="select3" name="marry">
                    <option value ="0" ></option>
                    <option value ="1" >未婚</option>
                    <option value ="2" >已婚</option>
                    <option value="3"  >离异</option>
                </select>
            </div>

            <!-- 入职时间 -->
            <label class="col-sm-2 control-label">入职时间</label>
            <div class="col-sm-4">
                <input id="input16" type="text" class="form-control" name="inTime" value="<fmt:formatDate value='${n.inTime }' pattern='yyyy-MM-dd'/>" onclick="laydate({format: 'YYYY-MM-DD'})">
            </div>
        </div>
        <div class="form-group">

            <!-- 员工状态/1.录用/2.停职 -->
            <label class="col-sm-2 control-label">员工状态</label>
            <div class="col-sm-4">
                <select id="select4" name="status">
                    <option value ="0" ></option>
                    <option value ="1" >入职</option>
                    <option value ="2" >转正</option>
                    <option value="3"  >离职</option>
                </select>
            </div>
        </div>

        <h3 align="center">学历信息</h3>
        <hr align="center" size="3" color="#00FFFF"/>
        <div class="wrapper wrapper-content animated fadeInRight" id="div1">
            <div class="form-group">
                <!-- 学习起始时间 -->
                <label class="col-sm-2 control-label">学习起始时间</label>
                <div class="col-sm-4">
                    <input id="input17" type="text"  class="form-control" name="start"
                           onclick="laydate({format: 'YYYY-MM-DD'})">
                </div>
                <!-- 学习结束时间 -->
                <label class="col-sm-2 control-label">学习结束时间</label>
                <div class="col-sm-4">
                    <input id="input18" type="text" class="form-control" name="end"
                           onclick="laydate({format: 'YYYY-MM-DD'})">
                </div>
            </div>
            <div class="form-group">
                <!-- 专业 -->
                <label class="col-sm-2 control-label">专业</label>
                <div class="col-sm-4">
                    <input id="input19" type="text" class="form-control" name="majors" >
                </div>
                <!-- 学历 -->
                <label class="col-sm-2 control-label">学历</label>
                <div class="col-sm-4">
                    <select  id="select5" name="education">
                        <option value ="0" ></option>
                        <option value ="1" >高中</option>
                        <option value ="2" >本科</option>
                        <option value="3"  >硕士</option>
                        <option value="4"  >博士</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <!-- 证书 -->
                <label class="col-sm-2 control-label">证书</label>
                <div class="col-sm-4">
                    <input id="input20" type="text" class="form-control" name="certificate">
                </div>
            </div>
        </div>
        <div id="div11"></div>
        <div align="center">
            <button type="button" class="btn-2 btn-primary">添加记录</button>
            <hr align="center" size="3" color="#00FFFF"/>
        </div>

        <h3 align="center">紧急联系人信息</h3>
        <hr align="center"  size="3"  color="#00FFFF"/>
        <div class="wrapper wrapper-content animated fadeInRight" id="div2">
            <div class="form-group">
                <!-- 姓名 -->
                <label class="col-sm-2 control-label">姓名</label>
                <div class="col-sm-4">
                    <input id="input21" type="text" class="form-control" name="em_name" >
                </div>

                <!-- 关系 -->
                <label class="col-sm-2 control-label">关系</label>
                <div class="col-sm-4">
                    <input id="input22" type="text" class="form-control" name="relation">
                </div>
            </div>
            <div class="form-group">
                <!-- 联系电话 -->
                <label class="col-sm-2 control-label">联系电话</label>
                <div class="col-sm-4">
                    <input id="input23" type="text" class="form-control" name="em_phone">
                </div>

                <!-- 单位或住址 -->
                <label class="col-sm-2 control-label">单位或住址</label>
                <div class="col-sm-4">
                    <input id="input24" type="text" class="form-control" name="em_address" >
                </div>
            </div>
        </div>
        <div id="div22"></div>
        <div align="center">
            <%--<input type="button" class="btn btn-default" value="添加记录"/>--%>
            <button type="button" class="btn-1 btn-primary">添加记录</button>
            <hr align="center" size="3" color="#00FFFF"/>
        </div>


        <h3 align="center">工作经历信息</h3>
        <hr align="center"  size="3"  color="#00FFFF"/>
        <div class="wrapper wrapper-content animated fadeInRight" id="div3">
            <div class="form-group">
                <!-- 工作起始时间 -->
                <label class="col-sm-2 control-label">工作起始时间</label>
                <div class="col-sm-4">
                    <input id="input25" type="text" class="form-control" name="ex_start"
                           onclick="laydate({format: 'YYYY-MM-DD'})">
                </div>

                <!-- 工作结束时间 -->
                <label class="col-sm-2 control-label">工作结束时间</label>
                <div class="col-sm-4">
                    <input id="input26" type="text" class="form-control" name="ex_end"
                           onclick="laydate({format: 'YYYY-MM-DD'})">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">离职原因</label>
                <div class="col-sm-4">
                    <input id="input27" type="text" class="form-control" name="reason" >
                </div>

                <!-- 单位 -->
                <label class="col-sm-2 control-label">单位</label>
                <div class="col-sm-4">
                    <input id="input28" type="text" class="form-control" name="company">
                </div>
            </div>
            <div class="form-group">
                <!-- 工作 -->
                <label class="col-sm-2 control-label">工作</label>
                <div class="col-sm-4">
                    <input id="input29" type="text" class="form-control" name="work">
                </div>

                <!-- 职位 -->
                <label class="col-sm-2 control-label">职位</label>
                <div class="col-sm-4">
                    <input id="input30" type="text" class="form-control" name="ex_position" >
                </div>
            </div>
        </div>
        <div id="div33"></div>
        <div align="center">
            <button type="button" class="btn-3 btn-primary" >添加记录</button>
            <hr align="center" size="3" color="#00FFFF"/>
        </div>

        <h3 align="center">家庭成员信息</h3>
        <hr align="center" size="3" color="#00FFFF"/>
        <div class="wrapper wrapper-content animated fadeInRight" id="div4">
            <!-- 姓名 -->
            <div class="form-group">
                <%--<div >--%>
                <%--<input type="hidden"  name="employee.id" class="form-control">--%>
                <%--</div>--%>
                <label class="col-sm-2 control-label">姓名</label>
                <div class="col-sm-4">
                    <input id="input31" type="text" class="form-control" name="f_name" >
                </div>

                <!-- 关系 -->
                <label class="col-sm-2 control-label">关系</label>
                <div class="col-sm-4">
                    <input id="input32" type="text" class="form-control" name="f_relation">
                </div>
            </div>
            <div class="form-group">
                <!-- 联系方式 -->
                <label class="col-sm-2 control-label">联系方式</label>
                <div class="col-sm-4">
                    <input id="input33" type="text" class="form-control" name="contact" >
                </div>

                <!-- 年龄 -->
                <label class="col-sm-2 control-label">年龄</label>
                <div class="col-sm-4">
                    <input id="input34" type="text" class="form-control" name="age">
                </div>
            </div>
            <div class="form-group">

                <!-- 工作单位 -->
                <label class="col-sm-2 control-label">工作单位</label>
                <div class="col-sm-4">
                    <input id="input35" type="text" class="form-control" name="f_company">
                </div>
                <!-- 职位 -->
                <label class="col-sm-2 control-label">职位</label>
                <div class="col-sm-4">
                    <input id="input36" type="text" class="form-control" name="f_position" >
                </div>
            </div>
        </div>
        <div id="div44"></div>
        <div align="center">
            <input type="button" class="btn-4 btn-primary" value="添加记录" />
            <hr align="center" size="3" color="#00FFFF"/>
        </div>
        <div align="right">
            <input type="button" onclick="dosubmit();" value="保存"/>
            <input type="submit" name="Submit" value="确认提交" class="sub-btn btn btn-sm btn-outline btn-primary"/>
        </div>

    </form>

</div>
<%@include file="/common/foot.jsp" %>
<script type="text/javascript">
    $(document).on("click", ".sub-btn", function () {
        var form = $(this).parents("form");

        form.ajaxSubmit({
            success: function(data) {
                if (isSuccess(data)) {
                    reload();
                  //  location.reload()
                } else {
                }
            }
        });
    });

    //添加家庭成员
    $(document).on("click",".btn-4",function(){
//            var node = document.getElementById("div4");
//            var cloneNode = node.cloneNode(true);
//            node.parentNode.appendChild(cloneNode);
        var html = document.getElementById('family').innerHTML;
        $("#div44").append(html);
    })
    //添加工作经历
    $(document).on("click",".btn-3",function(){
//            var node = document.getElementById("div3");
//            var cloneNode = node.cloneNode(true);
//            node.parentNode.appendChild(cloneNode);
        var html = document.getElementById('experience').innerHTML;
        $("#div33").append(html);
    })
    //添加学历
    $(document).on("click",".btn-2",function(){
//              var node = document.getElementById("div1");
//              var cloneNode = node.cloneNode(true);
//              $("#div11").append(cloneNode);
        var html = document.getElementById('education').innerHTML;
        $("#div11").append(html);
    })

    //添加联系人
    $(document).on("click",".btn-1",function(){
//            var node = document.getElementById("div2");
//            var cloneNode = node.cloneNode(true);
//            node.parentNode.appendChild(cloneNode);
        var html = document.getElementById('contact').innerHTML;
        $("#div22").append(html);
    })
</script>
<script type="text/template" id="education">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="form-group">
            <!-- 学习起始时间 -->
            <label class="col-sm-2 control-label">学习起始时间</label>
            <div class="col-sm-4">
                <input type="text"  class="form-control" name="start"
                       onclick="laydate({format: 'YYYY-MM-DD'})">
            </div>
            <!-- 学习结束时间 -->
            <label class="col-sm-2 control-label">学习结束时间</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="end"
                       onclick="laydate({format: 'YYYY-MM-DD'})">
            </div>
        </div>
        <div class="form-group">
            <!-- 专业 -->
            <label class="col-sm-2 control-label">专业</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="majors" >
            </div>
            <!-- 学历 -->
            <label class="col-sm-2 control-label">学历</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="record" >
            </div>
        </div>
        <div class="form-group">
            <!-- 证书 -->
            <label class="col-sm-2 control-label">证书</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="certificate">
            </div>
        </div>
        <div align="right"><button type="button"  class="btn btn-primary" onclick="$('#div11').remove(education)">取消</button></div>
    </div>
</script>

<script type="text/template" id="contact">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="form-group">
            <!-- 姓名 -->
            <label class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="em_name" >
            </div>

            <!-- 关系 -->
            <label class="col-sm-2 control-label">关系</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="relation">
            </div>
        </div>
        <div class="form-group">
            <!-- 联系电话 -->
            <label class="col-sm-2 control-label">联系电话</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="em_phone">
            </div>

            <!-- 单位或住址 -->
            <label class="col-sm-2 control-label">单位或住址</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="em_address" >
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="experience">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="form-group">
            <!-- 工作起始时间 -->
            <label class="col-sm-2 control-label">工作起始时间</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="ex_start"
                       onclick="laydate({format: 'YYYY-MM-DD'})">
            </div>

            <!-- 工作结束时间 -->
            <label class="col-sm-2 control-label">工作结束时间</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="ex_end"
                       onclick="laydate({format: 'YYYY-MM-DD'})">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">离职原因</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="reason" >
            </div>

            <!-- 单位 -->
            <label class="col-sm-2 control-label">单位</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="company">
            </div>
        </div>
        <div class="form-group">
            <!-- 工作 -->
            <label class="col-sm-2 control-label">工作</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="work">
            </div>

            <!-- 职位 -->
            <label class="col-sm-2 control-label">职位</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="ex_position" >
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="family">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="form-group">
            <%--<div >--%>
            <%--<input type="hidden"  name="employee.id" class="form-control">--%>
            <%--</div>--%>
            <label class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="f_name" >
            </div>

            <!-- 关系 -->
            <label class="col-sm-2 control-label">关系</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="f_relation">
            </div>
        </div>
        <div class="form-group">
            <!-- 联系方式 -->
            <label class="col-sm-2 control-label">联系方式</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="contact" >
            </div>

            <!-- 年龄 -->
            <label class="col-sm-2 control-label">年龄</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="age">
            </div>
        </div>
        <div class="form-group">

            <!-- 工作单位 -->
            <label class="col-sm-2 control-label">工作单位</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="f_company">
            </div>
            <!-- 职位 -->
            <label class="col-sm-2 control-label">职位</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" name="f_position" >
            </div>
        </div>
</script>
<script type="text/javascript">
    //检查select
    function checkSelect(obj) {
        var val = obj.value;
        if(val == "0") {
            obj.className = "errstyle";
            return false;
        } else {
            return true;
        }
    }

    //检查input
    function checkInput(obj) {
        var val = obj.value;
        if(val == "") {
            obj.className = "errstyle";
            return false;
        } else {
            return true;
        }
    }
    //获取焦点时清除错误
    function clearerr(obj) {
        if(obj.className = "errstyle") {
            obj.className = "bor";
        }
    }
    //提交校验
    function dosubmit() {
        var select1 = checkSelect(document.getElementById('select1'));
        var select2 = checkSelect(document.getElementById('select2'));
        var select3 = checkSelect(document.getElementById('select3'));
        var select4 = checkSelect(document.getElementById('select4'));
        var input1 = checkInput(document.getElementById('input1'));
        var input2 = checkInput(document.getElementById('input2'));
        var select6 = checkInput(document.getElementById('select6'));
        var input4 = checkInput(document.getElementById('input4'));
        var input5 = checkInput(document.getElementById('input5'));
        var input6 = checkInput(document.getElementById('input6'));
        var input7 = checkInput(document.getElementById('input7'));
        var input8 = checkInput(document.getElementById('input8'));
        var input9 = checkInput(document.getElementById('input9'));
        var input10 = checkInput(document.getElementById('input10'));
        var input11 = checkInput(document.getElementById('input11'));
        var input12 = checkInput(document.getElementById('input12'));
        var input13 = checkInput(document.getElementById('input13'));
        var input14 = checkInput(document.getElementById('input14'));
        var input15 = checkInput(document.getElementById('input15'));
        var input16 = checkInput(document.getElementById('input16'));
        var input17 = checkInput(document.getElementById('input17'));
        var input18 = checkInput(document.getElementById('input18'));
        var input19 = checkInput(document.getElementById('input19'));
        var input20 = checkInput(document.getElementById('input20'));
        var input21 = checkInput(document.getElementById('input21'));
        var input22 = checkInput(document.getElementById('input22'));
        var input23 = checkInput(document.getElementById('input23'));
        var input24 = checkInput(document.getElementById('input24'));
        var input25 = checkInput(document.getElementById('input25'));
        var input26 = checkInput(document.getElementById('input26'));
        var input27 = checkInput(document.getElementById('input27'));
        var input28 = checkInput(document.getElementById('input28'));
        var input29 = checkInput(document.getElementById('input29'));
        var input30 = checkInput(document.getElementById('input30'));
        var input31 = checkInput(document.getElementById('input31'));
        var input32 = checkInput(document.getElementById('input32'));
        var input33 = checkInput(document.getElementById('input33'));
        var input34 = checkInput(document.getElementById('input34'));
        var input35 = checkInput(document.getElementById('input35'));
        var input36 = checkInput(document.getElementById('input36'));
        var input37 = checkInput(document.getElementById('department-id'));
        var input38 = checkInput(document.getElementById('department-name'));
        if(select1 && select2 && select3 && select4 && select6 && input1 && input2 && input4 && input5 && input6 && input7 && input8 && input9 && input10 && input11 && input12 && input13 && input14
            && input15 && input16 && input17 && input18 && input19 && input20 && input21 && input22 && input23 && input24 && input25 && input26 && input27 && input28 && input29 && input30 && input31 && input32
            && input33 && input34 && input35 && input36)
        {
            //提交表单代码
            alert("验证通过,可以提交表单");
        } else {
            alert("有项目未填写，不能提交");
        }
    }
</script>
</body>
</html>
